package com.ly.hotel.view.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;

import com.ly.hotel.R;

public class FloatActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_xiaofei_nm);
    }

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
            final View view = getWindow().getDecorView();
            final WindowManager.LayoutParams lp = (WindowManager.LayoutParams) view.getLayoutParams();
            lp.gravity = Gravity.CENTER;
            lp.width = 1280;
            lp.height = 720;
            getWindowManager().updateViewLayout(view, lp);
    }
}
